<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Flaskr</title>
	<link rel=stylesheet type=text/css href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css">
	<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
	<script src="http://cdn.bootcss.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
  <body>
<div class="navbar navbar-inverse" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">搜房网房源</a>
        </div>
          {% if not session.logged_in %}



        <div class="navbar-collapse collapse">
          <form class="navbar-form navbar-right" role="form" action="{{ url_for('login') }}" method=post>
            <div class="form-group">
              <input type="text" name=username placeholder="用户名" class="form-control">
            </div>
            <div class="form-group">
              <input type="password" name=password placeholder="密码" class="form-control">
            </div>
            <button type="submit" value=Login class="btn btn-success">登录</button>
          </form>
        </div><!--/.navbar-collapse -->
          {% else %}
        <div class="navbar-collapse collapse">
          <form class="navbar-form navbar-right" role="form" action="{{ url_for('refresh') }}" method=post>

            <button type="submit" value=Login class="btn btn-success">刷新房源</button>
          </form>
        </div><!--/.navbar-collapse -->
          {% endif %}
      </div>
    </div>

<div class="container">
  {% for message in get_flashed_messages() %}
    <div class="alert alert-success" role="alert">{{ message }}</div>
  {% endfor %}
<div class="row">
  <div class="col-xs-12">


  {% block body %}{% endblock %}



  </div>

</div>



    </div><!-- /.container -->



  </body>

